<?php defined('LFNC_PACKAGE') or die('forbidden');


/**
* MLT Web Engine
* http://www.molotsoft.ru
*
* @package MLT_WE
* @subpackage Lucky_Funcs
* @author Ivan Chistyakov <ivan@molotsoft.ru>
* @version $Id: mssql_insert_id.lfnc.php 294 2009-07-30 20:13:18Z molotsoft@gmail.com $
* @link $HeadURL: http://lucky-funcs.googlecode.com/svn/trunk/funcs/mssql/mssql_insert_id.lfnc.php $
*/


function mssql_insert_id($db) {
	if (is_mssql_result($dbr = mssql_queryf($db, 'SELECT @@IDENTITY;'))) {
		$insert_id = (int)mssql_fetch_value($dbr);
		mssql_free_result($dbr);
		return $insert_id;
	}
	return FALSE;
}


?>